using System;
using EPiServer.Common;
using EPiServer.Common.Publishing;
using EPiServer.Community.VideoGallery;
using EPiServer.Community.VideoGallery.Queries;

namespace EPiAbstractions.Community.VideoGallery
{
    public interface IVideoGalleryHandlerFacade
    {
        EPiServer.Community.VideoGallery.VideoGallery AddVideoGallery(EPiServer.Community.VideoGallery.VideoGallery videoGallery);

        void UpdateVideoGallery(EPiServer.Community.VideoGallery.VideoGallery videoGallery);

        void RemoveVideoGallery(EPiServer.Community.VideoGallery.VideoGallery videoGallery);

        EPiServer.Community.VideoGallery.VideoGallery GetVideoGallery(Int32 id);

        VideoGalleryCollection GetVideoGalleryChildren(EPiServer.Community.VideoGallery.VideoGallery parent);

        Video AddVideo(Video video);

        void UpdateVideo(Video video);

        void RemoveVideo(Video video);

        Video GetVideo(Int32 id);

        Video GetVideo(Guid cdnId);

        VideoCollection GetVideos(VideoGalleryCollection galleries, Int32 page, Int32 pageSize, VideoSortOrder[] sortOrder);

        VideoCollection GetVideos(VideoGalleryCollection galleries, Int32 page, Int32 pageSize, out Int32 totalItems,
                                  VideoSortOrder[] sortOrder);

        VideoCollection GetVideos(VideoGalleryCollection galleries, Int32 page, Int32 pageSize, ProcessingStage processingStage,
                                  out Int32 totalItems, VideoSortOrder[] sortOrder);

        VideoCollection GetVideos(VideoGalleryCollection galleries, Int32 page, Int32 pageSize, PublishState publishState,
                                  out Int32 totalItems, VideoSortOrder[] sortOrder);

        VideoCollection GetVideos(VideoGalleryCollection galleries, Int32 page, Int32 pageSize, ProcessingStage processingStage,
                                  PublishState publishState, out Int32 totalItems, VideoSortOrder[] sortOrder);

        VideoCollection GetVideos(VideoGalleryCollection galleries, Int32 page, Int32 pageSize, ProcessingStage processingStage,
                                  PublishState publishState, Boolean ignoreCache, out Int32 totalItems, VideoSortOrder[] sortOrder);

        VideoCollection GetVideos(VideoGalleryCollection galleries, Int32 page, Int32 pageSize, ProcessingStage processingStage,
                                  PublishState publishState, Boolean ignoreCache, TimeSpan? explicitCacheTime, out Int32 totalItems,
                                  VideoSortOrder[] sortOrder);

        VideoCollection GetQueryResult(VideoQuery query);

        VideoCollection GetQueryResult(VideoQuery query, Int32 page, Int32 pageSize);

        VideoCollection GetQueryResult(VideoQuery query, Int32 page, Int32 pageSize, out Int32 totalItems);

        VideoGalleryCollection GetQueryResult(VideoGalleryQuery query);

        VideoGalleryCollection GetQueryResult(VideoGalleryQuery query, Int32 page, Int32 pageSize);

        VideoGalleryCollection GetQueryResult(VideoGalleryQuery query, Int32 page, Int32 pageSize, out Int32 totalItems);

        VideoCommentCollection GetQueryResult(VideoCommentQuery query);

        VideoCommentCollection GetQueryResult(VideoCommentQuery query, Int32 page, Int32 pageSize);

        VideoCommentCollection GetQueryResult(VideoCommentQuery query, Int32 page, Int32 pageSize, out Int32 totalItems);

        VideoComment AddVideoComment(VideoComment videoComment);

        VideoComment GetVideoComment(Int32 id);

        VideoCommentCollection GetVideoComments(Video video, Int32 page, Int32 pageSize, VideoCommentSortOrder[] sortOrder);

        VideoCommentCollection GetVideoComments(Video video, Int32 page, Int32 pageSize, out Int32 totalItems,
                                                VideoCommentSortOrder[] sortOrder);

        void UpdateVideoComment(VideoComment videoComment);

        void RemoveVideoComment(VideoComment videoComment);

        event EPiServerCommonEventHandler VideoAdded;

        event EPiServerCommonEventHandler VideoUpdated;

        event EPiServerCommonEventHandler VideoRemoved;

        event EPiServerCommonEventHandler VideoGalleryAdded;

        event EPiServerCommonEventHandler VideoGalleryUpdated;

        event EPiServerCommonEventHandler VideoGalleryRemoved;

        event EPiServerCommonEventHandler VideoCommentAdded;

        event EPiServerCommonEventHandler VideoCommentUpdated;

        event EPiServerCommonEventHandler VideoCommentRemoved;
    }
}